<%
'******************************************************************************************
'#          Openasp CMS software opensource                                               #
'******************************************************************************************
'#      Copyright (C) Luca Becchetti, Broken Ice Interactive                              #
'#                                                                                        #
'# Questo software è gratuito, è possibile ridistribuire e modificare il prodotto         #
'# rispettando i termini della GNU General Public License pubblicata dalla Free           #
'# Software Foundation, si fa riferimento alla versione attuale e a tutte le versioni.    #
'# future                                                                                 #
'#                                                                                        #
'# Il software viene distribuito con lo scopo di essere utile e di aiutare nella          #
'# realizzazione di un sito web, non ci assiumiamo nessuna responsabilità per             #
'# eventuali malfunzionamenti o problemi provenienti dal programma.                       #
'#                                                                                        #
'# E' assolutamente vietato eliminare ogni riferimento di copyright sia all'interno del   #
'# del codice sorgente sia quelli visivi nel progetto.                                    #
'#                                                                                        #
'# Una copia della licenza GNU GPL è rilasciata nel pacchetto di istallazione del         #
'# software.                                                                              #
'#                                                                                        #
'# Per supporto visita il nostro sito ufficiale                                           #
'# http://www.openasp.it                                                                  #
'#                                                                                        #
'#                                                                                        #
'******************************************************************************************
i = split(request.ServerVariables("HTTP_URL"), "/")
if strComp("modifica.asp", i(Ubound(i)), 1) = 0 then
  response.redirect request.servervariables("HTTP_REFERER")
end if
%>
<script language="javascript" type="text/javascript">

/**
FUNZIONE: control_edit
DESCRIZIONE: Controlla la corretteza dei dati inseriti da un utente nel form
USO: usata nel form di modifica degli utenti
ARGOMENTI: ---
**/
function control_edit(){
  
  if(window.document.reg.Upass.value != window.document.reg.Upass1.value){
					alert("<%=traduci("ling_reg_27")%>")
					window.document.reg.Upass1.focus(); 
     return false;
  }
 
 //Controllo del campo e-mail
 if (window.document.reg.Email.value == "") {
  alert("<%=traduci("ling_reg_28")%>")
  window.document.reg.Email.focus(); 
    return false;
 }else{
    EmailAddr = window.document.reg.Email.value;
    Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
    if (!Filtro.test(EmailAddr)){
						window.alert("<%=traduci("ling_reg_30")%>");
						window.document.reg.Email.focus();
						return false;
   }
 }
	
}
</script>
<%
		if session("uID") = "" or session("uID") = 0 then
			response.Redirect "default.asp"
		end if
		Select case request.QueryString("pass")
		case "":
 		strSQL = "SELECT * FROM TB_USERS WHERE Uid = " & session("uID")
		Set modRS = objConn.Execute(strSQL)
		%>
				<form name="reg" id="reg" action="default.asp?modulo=profilo&amp;file=modifica&amp;pass=1" method="post" onSubmit="return control_edit()">   

						<h2><%= Ucase(traduci("ling_reg_11")) %></h2>
						<br />
						<p>
						<label for="Uname"><%=traduci("ling_reg_02")%></label>
							<input class="inputclass" type="hidden" name="Uname" value="<%=modRS("Uname")%>" maxlength="50" />
							<%=modRS("Uname")%> 	
						</p>
						<p>
							<label for="Upass"><%=traduci("ling_reg_03")%></label>
							<input class="inputclass" type="password" name="Upass" value="" maxlength="50" />
							<small><%=traduci("ling_reg_42")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=26','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="Upass1"><%=traduci("ling_reg_23")%></label>
							<input class="inputclass" type="password" name="Upass1" value="" maxlength="50" />
							<small><%=traduci("ling_reg_42")%></small>	 		
							<a onClick="javascript:creapop('help.asp?hlp=27','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="Email"><%=traduci("ling_reg_04")%></label>
							<input class="inputclass" type="text" name="Email" value="<%=modRS("email")%>" maxlength="150" />
							<small><%=traduci("ling_reg_43")%></small>	 		
							<a onClick="javascript:creapop('help.asp?hlp=28','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="emailvisib"><%=traduci("ling_reg_12")%></label>
							<%if modRS("emailvisib") = 1 then%>
								<input type="checkbox" name="emailvisib" value="ok" checked />
							<%else%>
								<input type="checkbox" name="emailvisib" value="ok" />
							<%End if%>
							<a onClick="javascript:creapop('help.asp?hlp=29','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<%
						if isMOD(modRS("uID"), "content") then
						%>
						<p>
							<label for="pglimit"><%=traduci("ling_reg_100")%></label>
							<input type="text" name="pglimit" value="<%= modRS("PAGE_LIMIT") %>" maxlength="5" class="inputclass" />
							<small><%=traduci("ling_reg_99")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=88','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="mblimit"><%=traduci("ling_reg_101")%></label>
							<input type="text" name="mblimit" value="<%= modRS("STORE_LIMIT") %>" maxlength="5" class="inputclass" />
							<small><%=traduci("ling_reg_99")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=89','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<%
						end if
						%>
						<br />
						<h2><%= Ucase(traduci("ling_reg_75")) %></h2>
						<br />
						<p>
							<label for="MSN"><%=traduci("ling_reg_76")%></label>
	
							<input class="inputclass" type="text" name="MSN" value="<%=modRS("MSN")%>" maxlength="50" />
							<small><%=traduci("ling_reg_42")%></small>	
							<a onClick="javascript:creapop('help.asp?hlp=69','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="YAHOO"><%=traduci("ling_reg_77")%></label>
							<input class="inputclass" type="text" name="YAHOO" value="<%=modRS("YAHOO")%>" maxlength="50" />
							<small><%=traduci("ling_reg_42")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=70','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="ICQ"><%=traduci("ling_reg_78")%></label>
							<input class="inputclass" type="text" name="ICQ" value="<%=modRS("ICQ")%>" maxlength="50" />
							<small><%=traduci("ling_reg_42")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=71','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="AOL"><%=traduci("ling_reg_79")%></label>
							<input class="inputclass" type="text" name="AOL" value="<%=modRS("AOL")%>" maxlength="50" />
							<small><%=traduci("ling_reg_42")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=72','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>	
							<label for="AOL"><%=traduci("ling_reg_102")%></label>
							<input class="inputclass" type="text" name="SKYPE" value="<%=modRS("SKYPE")%>" maxlength="50" />
							<small><%=traduci("ling_reg_42")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=90','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>						
						<div style="border:1px #999999 solid; position:relative; height:100px; padding:20px; width:80%; margin:auto;">
							<div style="float:left;">
							<b><%=traduci("ling_reg_80")%></b><br />
							<br style="clear:both" />
							<input type="radio" name="typeimg" value="url"  onClick="window.document.getElementById('imgdiv').innerHTML = ''"
							<%
							if Left(modRS("Avatar"), 7) = "http://" then
							%>
							checked
							<%
							end if
							%>
							 />
							<input class="inputclass" type="text" name="url" value="
							<%if Left(modRS("Avatar"), 7) = "http://" then response.Write modRS("Avatar") else response.Write "http://" end if%>" maxlength="255" />
							<font class="testosmall"><%=traduci("ling_reg_42")%></font>	 	
							<a onClick="javascript:creapop('help.asp?hlp=73','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
							<script language="javascript" type="text/javascript">
							//Funzione per la preview di un immagine, compatibilità con mozilla firefox aggiunta da {spike}
							function showimg(x){
								//Controllo che sia attiva la selezione dell'immagine
								if (window.document.reg.typeimg[1].checked){
									//carico l'anteprima...
									window.document.getElementById('imgdiv').innerHTML = '<img src=themes/SHARE/Avatar/' + x + '>';
								}
							}
							</script>
							<br style="clear:both" />
							<input type="radio" name="typeimg" value="sel" onClick="showimg(document.reg.sel.options[window.document.reg.sel.selectedIndex].value)" <%if Left(modRS("Avatar"), 6) = "themes" then%>checked<%end if%> />
							<select name="sel" onChange="showimg(document.reg.sel.options[window.document.reg.sel.selectedIndex].value)" class="selectclass"><%
							'Recupero la directory degli avatar
							dir= "themes/SHARE/Avatar"
							Set file1 = CreateObject("Scripting.FileSystemObject")
							Set file2 = file1.GetFolder(server.mappath(dir))
							Set file3 = file2.Files
							'Itero tutti gli avatar
							For Each file in file3
								'Controllo che sia un immagine
								if StrComp(Right(file.name, 4), ".gif",1) = 0 OR StrComp(Right(file.name, 4), ".jpg",1) = 0 OR StrComp(Right(file.name, 4), ".png",1) = 0then
									'Scrivo la option per la select
									response.write "<option value="""
									response.write file.name & """"
									call selected(file.name, Right(modRS("Avatar"), Len(file.name)))
									response.write ">"&file.name
									response.write "</option>"
								end if
							Next		  
							%>
							</select>
							<br />
							<input type="radio" name="typeimg" value="null"  onClick="window.document.getElementById('imgdiv').innerHTML = ''" <%if trim(modRS("Avatar")) = "" OR isNull(modRS("Avatar")) then%>checked<%end if%> />
							<%=traduci("ling_reg_85")%>
							</div>
							<div id="imgdiv" style="float:right; width:100px; height:100px; overflow:hidden; background-color:#CCCCCC; border: 2px #999999 groove">
								<%if modRS("Avatar") <> "" AND modRS("Avatar") <> "http://" then%>
									<img alt="avatar" src="<%=modRS("Avatar")%>" />
								<%end if%>
							</div>
						</div>
						<br />
						<h2><%= Ucase(traduci("ling_reg_14")) %></h2>
						<br />
						<p>	
							<label for="Nome"><%=traduci("ling_reg_05")%></label>						
							<input class="inputclass" type="text" name="Nome" value="<%=modRS("Nome")%>" maxlength="50" />
							<small><%=traduci("ling_reg_42")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=31','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="Cognome"><%=traduci("ling_reg_06")%></label>
							<input class="inputclass" type="text" name="Cognome" value="<%=modRS("Cognome")%>" maxlength="50" />
							<small><%=traduci("ling_reg_42")%></small>	 	
							<a onClick="javascript:creapop('help.asp?hlp=32','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="eta"><%=traduci("ling_reg_07")%></label>
							<input class="inputclass" type="text" name="eta" value="<%=modRS("anni")%>" maxlength="3" />
							<small><%=traduci("ling_reg_44")%></small>	
							<a onClick="javascript:creapop('help.asp?hlp=33','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="regione"><%=traduci("ling_reg_09")%></label>
							<input class="inputclass" type="text" name="regione" value="<%=modRS("regione")%>" maxlength="50" />
							<small><%=traduci("ling_reg_42")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=34','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<P>
							<label for="provincia"><%=traduci("ling_reg_10")%></label>
							<input class="inputclass" type="text" name="provincia" value="<%=modRS("provincia")%>" maxlength="50" />
							<small><%=traduci("ling_reg_42")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=35','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="coloreocchi"><%=traduci("ling_reg_15")%></label>
							<input class="inputclass" type="text" name="coloreocchi" value="<%=modRS("occhi")%>" maxlength="50" />
							<small><%=traduci("ling_reg_42")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=36','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="link1"><%=traduci("ling_reg_19")%></label>
							<input class="inputclass" type="text" maxlength="255" name="link1" size="20" <%if NOT modRS("link1") = "http://" AND NOT Trim(modRS("link1")) = "" then%>value="<%=modRS("link1")%>" <%else%>value="http://"<%end if%> /> 
							<small><%=traduci("ling_reg_45")%></small>	
							<a onClick="javascript:creapop('help.asp?hlp=40','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="link">2</label><input class="inputclass" type="text" maxlength="255" name="link2" size="20" <%if NOT modRS("link2") = "http://" AND NOT Trim(modRS("link2")) = "" then%>value="<%=modRS("link2")%>" <%else%>value="http://"<%end if%> />
							<small><%=traduci("ling_reg_45")%></small>	
							<a onClick="javascript:creapop('help.asp?hlp=40','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="lin3k">3</label><input class="inputclass" type="text" maxlength="255" name="link3" size="20" <%if NOT modRS("link3") = "http://" AND NOT Trim(modRS("link3")) = "" then%>value="<%=modRS("link3")%>" <%else%>value="http://"<%end if%> />
							<small><%=traduci("ling_reg_45")%></small>	
							<a onClick="javascript:creapop('help.asp?hlp=40','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="link4">4</label><input class="inputclass" type="text" maxlength="255" name="link4" size="20" <%if NOT modRS("link4") = "http://" AND NOT Trim(modRS("link4")) = "" then%>value="<%=modRS("link4")%>" <%else%>value="http://"<%end if%> />
							<small><%=traduci("ling_reg_45")%></small>	
							<a onClick="javascript:creapop('help.asp?hlp=40','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="website"><%=traduci("ling_reg_20")%></label>
							<input class="inputclass" type="text" maxlength="255" name="website" size="20" <%if NOT modRS("website") = "http://" AND NOT Trim(modRS("website")) = "" then%>value="<%=modRS("website")%>" <%else%>value="http://"<%end if%> />
							<small><%=traduci("ling_reg_45")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=41','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>
						<p>
							<label for="foto"><%=traduci("ling_reg_21")%></label>
							<input class="inputclass" type="text" maxlength="255" name="foto" size="20" <%if NOT modRS("foto") = "http://" AND NOT Trim(modRS("foto")) = "" then%>value="<%=modRS("foto")%>" <%else%>value="http://"<%end if%> />
							<small><%=traduci("ling_reg_45")%></small>
							<a onClick="javascript:creapop('help.asp?hlp=42','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</p>						
						<div style="float:left; margin-left:20px; margin-right:20px;">
							<%=traduci("ling_reg_16")%><br />
							<textarea class="inputclass" name="hobby" rows="4" cols="20"><%=modRS("hobby")%></textarea><br />
							<script type="text/javascript">displaylimit("document.reg.hobby",255)</script>
							<a onClick="javascript:creapop('help.asp?hlp=37','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</div>
						<div style="margin-left:20px; margin-right:20px;">
							<%=traduci("ling_reg_17")%><br />
							<textarea class="inputclass" name="miadesc" rows="4" cols="20"><%=modRS("miadesc")%></textarea><br />
							<script type="text/javascript">displaylimit("document.reg.miadesc",255)</script>	
							<a onClick="javascript:creapop('help.asp?hlp=38','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</div>
						<br style="clear:left;" />
						<div style="float:left; margin-left:20px; margin-right:20px;">
							<%=traduci("ling_reg_18")%><br />
							<textarea class="inputclass" name="altridesc" rows="4" cols="20"><%=modRS("altridesc")%></textarea><br />
							<script type="text/javascript">displaylimit("document.reg.altridesc",255)</script>	
							<a onClick="javascript:creapop('help.asp?hlp=39','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</div>
						<div style="margin-left:20px; margin-right:20px;">
							<%=traduci("ling_reg_22")%><br />
							<textarea class="inputclass" name="motto" rows="4" cols="20"><%=modRS("sig")%></textarea><br />
							<script type="text/javascript">displaylimit("document.reg.motto",255)</script>	
							<a onClick="javascript:creapop('help.asp?hlp=43','helpdesk','450','250');">
								<img alt="<%=traducisys("ling_134")%>" src="themes/SHARE/IMG_35.gif" border="0" />
							</a>
						</div>
						<br style="clear:left;" />
						<p>
							<input type="hidden" name="control" value="upd" />
							<input type="hidden" name="uID" value="<%=modRS("uID")%>" />
							<input type="submit" value="<%=traducisys("ling_111")%>" class="buttonclass" />
						</p>
					</form>  
		<%
		case 1:
			if request.Form("control") = "upd" then
					strSQL = "UPDATE TB_USERS SET"
								'Controllo l'esistenza del campo password, se esiste significa che si vuole cambiare la password
								if request.Form("Upass") <> "" and request.Form("Upass1") <> "" then
									'Controllo se è attiva l'opzione per l'MD5
									if SPC = "MD5" then
										strSQL = strSQL & " Upass = '"&MD5(request.Form("Upass"))&"', "
									else
										strSQL = strSQL & " Upass = '"&request.Form("Upass")&"', "
									end if
								'se non si vuole cambiare password ricarico la nuova
								end if
								'Aggiorno tutti i campi
								strSQL = strSQL & " Nome = '"&testSQLinj(request.Form("Nome"))&"', "
								strSQL = strSQL & " Cognome = '"&testSQLinj(request.Form("Cognome"))&"', "
								strSQL = strSQL & " Email = '"&testSQLinj(request.Form("Email"))&"', "
								strSQL = strSQL & " Regione = '"&testSQLinj(request.Form("Regione"))&"', "
								strSQL = strSQL & " provincia = '"&testSQLinj(request.Form("Provincia"))&"', "
								strSQL = strSQL & " Sig = '"&testSQLinj(request.Form("motto"))&"', "	
								strSQL = strSQL & " Website = '"&testSQLinj(request.Form("website"))&"', "		
								'Creo le stringe per le autorizzazione amministratore e moderatore
								Dim strAutoADM, strAutoMOD
								strAutoMOD = ""
								strAutoADM = ""
								lista = ""
								'Istanzo l'oggetto
								Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
								'Recupero la cartella moduli
								Set objFolder = objFSO.GetFolder(Server.MapPath("moduli"))
								'Itero tutte le cartelle dei moduli
								For each objSubFolder in objFolder.SubFolders
									'Controllo che la cartellla attuale non sia già presente nella lista
									if NOT inStr(lista,  objSubFolder.Name&",") > 0 then
										'Aggiungo la cartella alla lista
										lista = lista & objSubFolder.Name & ","
									end if
								Next
								Set objFolder = Nothing
								'recupero la directory moduli admin
								Set objFolder = objFSO.GetFolder(Server.MapPath("admin/moduli"))
								'Itero tutte le sottocartelle
								For each objSubFolder in objFolder.SubFolders
									'Controllo che la cartella non sia già nella lista
									if NOT inStr(lista,  objSubFolder.Name&",") > 0 then
										'aggiungo la cartella alla lista
										lista = lista & objSubFolder.Name & ","
									end if
								Next	
								'Spltto al lista per recuperare ogni singolo elemento
								sing = split(Trim(lista), ",")
								'Itero gli elementi della lista
								For each nom in sing
									'Controllo che l'elemento attuale non sia vuoto e che non sia il modulo admin
									if trim(nom) <> "" AND nom <> "admin" then
										'Se dal form ricevo il grado di admin per l'elemento attuale lo aggiungo ad una lista temporanea
										if request.Form(nom) = "admin" then
											strAutoADM = strAutoADM & nom & ", "
										end if
										'Se dal form ricevo il grado di mod per l'elemento attuale lo aggiungo ad una lista temporanea
										if request.Form(nom) = "mod" then
											strAutoMOD = strAutoMOD & nom & ", "
										end if
									end if
								Next
								Set objFSO = Nothing
								Set objFolder = Nothing   
								strSQL = strSQL & " anni = '"&testSQLinj(request.Form("Eta"))&"', "
								strSQL = strSQL & " Hobby = '"&testSQLinj(request.Form("Hobby"))&"', "
								strSQL = strSQL & " occhi = '"&testSQLinj(request.Form("Coloreocchi"))&"', "
								strSQL = strSQL & " Foto = '"&testSQLinj(request.Form("Foto"))&"', "
								strSQL = strSQL & " Miadesc = '"&testSQLinj(request.Form("miadesc"))&"', "
								strSQL = strSQL & " Altridesc = '"&testSQLinj(request.Form("altridesc"))&"', "
								strSQL = strSQL & " link1 = '"&testSQLinj(request.Form("link1"))&"', "
								strSQL = strSQL & " link2 = '"&testSQLinj(request.Form("link2"))&"', "
								strSQL = strSQL & " link3 = '"&testSQLinj(request.Form("link3"))&"', "
								strSQL = strSQL & " link4 = '"&testSQLinj(request.Form("link4"))&"', "
								strSQL = strSQL & " ICQ = '"&testSQLinj(request.Form("ICQ"))&"', "
								strSQL = strSQL & " MSN = '"&testSQLinj(request.Form("MSN"))&"', "
								strSQL = strSQL & " YAHOO = '"&testSQLinj(request.Form("YAHOO"))&"', "
								strSQL = strSQL & " AOL = '"&testSQLinj(request.Form("AOL"))&"', "
								strSQL = strSQL & " SKYPE = '"&testSQLinj(request.Form("SKYPE"))&"', "
								'Controllo che tipo di avatar si intende utilizzare
								if request.Form("typeimg") = "url" then
									avxx = request.Form("url")		
								elseif request.Form("typeimg") = "sel" then
									avxx = "themes/SHARE/AVATAR/" & request.Form("sel")		
								else
									avxx = ""
								end if
								strSQL = strSQL & " Avatar = '"&testSQLinj(avxx)&"', "
								'Controllo se l'email deve essere visibile o meno   
								if request.Form("emailvisib") = "ok" then
									strSQL = strSQL & " emailvisib = '1', "
								else
									strSQL = strSQL & " emailvisib = '0', "
								end if
								select case request.Form("typeu")
									CASE 1:
										strSQL = strSQL & " LivelloUser = '0', "
									CASE 2:
										strSQL = strSQL & " LivelloUser = '2', "
									CASE 3:
										strAutoADM = strAutoADM & "content, "
									CASE 4:
										strAutoMOD = strAutoMOD & "content, "
								end select
								'Aggiorno tutti i valori
								strSQL = strSQL & " AutorizzazioniMOD = '"&testSQLinj(strAutoMOD)&"', "
								strSQL = strSQL & " AutorizzazioniADM = '"&testSQLinj(strAutoADM)&"', "
								if request.Form("typeu") = "4" then
									mblimit = request.Form("mblimit")
									if not isNumeric(mblimit) then mblimit = 0
									if mblimit < 0 then mblimit = 0
									pglimit = request.Form("pglimit")
									if pglimit < 0 then pglimit = 0					
									if not isNumeric(pglimit) then pglimit = 0
									strSQL = strSQL & "STORE_LIMIT = '"&mblimit&"', PAGE_LIMIT = '"&pglimit&"'"
								else
									strSQL = strSQL & "STORE_LIMIT = '0',PAGE_LIMIT = '0'"
								end if							
								strSQL = strSQL & " WHERE uID = " & request.Form("uID")

								objConn.Execute(strSQL)  
								call autoReturn("default.asp?modulo=profilo", 2)		
				end if		
		End select 
		%>  